package torrentfile;

public class InfoForSingleFile extends Info {
	private FileInfo m_file_info;
	
	// Constructors
	public InfoForSingleFile(FileInfo fileInfo, int pieceLength,
			String pieces,String source) {
		super(pieceLength, pieces, source);
		setFileInfo(fileInfo);
	}
	
	public InfoForSingleFile(FileInfo fileInfo, int pieceLength,
			String pieces, boolean priv, String source) {
		super(pieceLength, pieces, priv, source);
		setFileInfo(fileInfo);
	}
	
	public InfoForSingleFile(String name, long length, int pieceLength,
			String pieces, String source) {
		super(pieceLength, pieces, source);
		setFileInfo(new FileInfo(name, length));
	}
	
	public InfoForSingleFile(String name, long length, int pieceLength,
			String pieces, boolean priv, String source) {
		super(pieceLength, pieces, priv, source);
		setFileInfo(new FileInfo(name, length));
	}
	
	public InfoForSingleFile(String name, long length, String md5sum, 
			int pieceLength, String pieces, String source) {
		super(pieceLength, pieces, source);
		setFileInfo(new FileInfo(name, length, md5sum));
	}
	
	public InfoForSingleFile(String name, long length, String md5sum,
			int pieceLength, String pieces, boolean priv, String source) {
		super(pieceLength, pieces, priv, source);
		setFileInfo(new FileInfo(name, length, md5sum));
	}

	// Accessors
	public FileInfo getFileInfo() {
		return m_file_info;
	}

	public void setFileInfo(FileInfo fileInfo) {
		this.m_file_info = fileInfo;
	}
}
